package com.lengxf.pay.common.sign.service;

import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.asymmetric.Sign;
import cn.hutool.crypto.asymmetric.SignAlgorithm;

public class Md5SignService implements SignService {

    private final static SignAlgorithm SIGN_ALGORITHM = SignAlgorithm.MD5withRSA;

    @Override
    public String sign(String text, String keyPrivate, String characterEncoding) {
        Sign sign = SecureUtil.sign(SIGN_ALGORITHM);
        return sign.signHex(text);
    }

    @Override
    public Boolean verify(String text, String sign, String keyPublic, String characterEncoding) {
        return null;
    }

}
